<?php
  require_once('conn.php');

  $db->query('SET NAMES UTF8');

  $sql="select studentid,studentname from student";

  $result = $db->query($sql);

  if ($result) {
    while ($row=$result->fetch_array()) {
      echo $row['0'],',',$row['studentname'],"<br>";
    }
    
    $result->close();
  }
  $db->close();
?>